package com.hk.commons.poi.excel.read.sax.v03.handler;

import com.hk.commons.poi.excel.read.sax.v03.XlsReadContext;
import org.apache.poi.hssf.record.BoundSheetRecord;
import org.apache.poi.hssf.record.Record;

/**
 * 存储了每个sheet的sheet名和每个sheet在文件流中的起始位置
 *
 * @author Kevin
 */
public class BoundSheetRecordHandler implements XlsRecordHandler {

    @Override
    public boolean support(Record poiRecord, XlsReadContext readContext) {
        return true;
    }

    @Override
    public void processRecord(Record poiRecord, XlsReadContext readContext) {
        readContext.getBoundSheetRecords().add((BoundSheetRecord) poiRecord);
    }
}
